<template>
	<div class="component">
		dynamic
	</div>
</template>
<script>
import { event } from 'api/user'

export default {
	props: {
		accountId: [String, Number]
	},
	data() {
		return {
			list: [],
			promise: null
		}
	},
	methods: {
    getEvent() {
			if (!this.accountId) return
      this.promise = event(this.accountId).then(res => {
        this.list = res.events
      })
    },
	},
	watch: {
		accountId() {
			this.getEvent()
		}
	}
}
</script>
<style lang="less" scoped>
.component{
	width: 100%;
	min-height: 1px;
}
</style>